package com.allwees.bs.module.wms.util;

import com.allwees.core.common.util.DateUtil;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 * 拣货单号生成
 *
 * @author mouhn
 * @since 2020-01-08 15:19
 */
public class WmsNoUtil {

    private static final String PICK_ORDER_PREFIX = "PO";

    /**
     * 生成拣货单单 no
     * @param uuid
     * @return
     */
    public static String genPickOrderNo(String uuid) {
        return PICK_ORDER_PREFIX + DateUtil.formatDate(new Date(), "yyMMddHHmm") + StringUtils.rightPad(String.valueOf(Math.abs(uuid.hashCode())), 6, '0');
    }
}
